import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取首页top图列表*/
export const getTopImg = (params: { page: number, pageSize: number , top_img_name ?: string}) => {
    return request({
        url: '/api/v2/admin/getTopImg',
        method: 'get',
        params
    })
} 

/**添加首页top图*/
export const addTopImg = (data: addFormData ) => request({
    url: '/api/v2/admin/addTopImg',
    method: 'post',
    data
}) 

/**删除首页top图*/
export const delTopImg = (data: { ID: string }) => request({
    url: '/api/v2/admin/delTopImg',
    method: 'post',
    data
})

/**更新首页top图*/
export const updateTopImg = (data: editFormData) => request({
    url: '/api/v2/admin/updateTopImg',
    method: 'post',
    data
})